package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the RECIBO database table.
 * 
 */
@Entity
@Table(name="RECIBO")
public class Recibo implements Serializable {
	private static final long serialVersionUID = 1L;
	private ReciboPK id;
	private String agntSync;
	private String anRecibo;
	private String coCaja;
	private BigDecimal montoCobr;
	private BigDecimal numTick;
	private Date tsUltSync;
	private Orden orden;
	private TmTipoMoneda tmTipoMoneda;

    public Recibo() {
    }


	@EmbeddedId
	public ReciboPK getId() {
		return this.id;
	}

	public void setId(ReciboPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="AN_RECIBO", length=4)
	public String getAnRecibo() {
		return this.anRecibo;
	}

	public void setAnRecibo(String anRecibo) {
		this.anRecibo = anRecibo;
	}


	@Column(name="CO_CAJA", length=2)
	public String getCoCaja() {
		return this.coCaja;
	}

	public void setCoCaja(String coCaja) {
		this.coCaja = coCaja;
	}


	@Column(name="MONTO_COBR", precision=12, scale=2)
	public BigDecimal getMontoCobr() {
		return this.montoCobr;
	}

	public void setMontoCobr(BigDecimal montoCobr) {
		this.montoCobr = montoCobr;
	}


	@Column(name="NUM_TICK", precision=8)
	public BigDecimal getNumTick() {
		return this.numTick;
	}

	public void setNumTick(BigDecimal numTick) {
		this.numTick = numTick;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to Orden
    @ManyToOne
	@JoinColumn(name="REFNUM_ORDEN", nullable=false, insertable=false, updatable=false)
	public Orden getOrden() {
		return this.orden;
	}

	public void setOrden(Orden orden) {
		this.orden = orden;
	}
	

	//bi-directional many-to-one association to TmTipoMoneda
    @ManyToOne
	@JoinColumn(name="COD_TIPO_MONEDA")
	public TmTipoMoneda getTmTipoMoneda() {
		return this.tmTipoMoneda;
	}

	public void setTmTipoMoneda(TmTipoMoneda tmTipoMoneda) {
		this.tmTipoMoneda = tmTipoMoneda;
	}
	
}